package cool.tsy.emos.wx.config.shiro;

import org.springframework.stereotype.Component;

/**
 * @author: hongxuan.wang
 * @date: Created in 2021/9/25 22:01
 * @description: 存放令牌的媒介类
 * @mail: 1443424326@qq.com
 */
@Component
public class ThreadLocalToken {
    private ThreadLocal<String> local = new ThreadLocal<>();

    public void setToken(String token) {
        local.set(token);
    }

    public String getToken() {
        return local.get();
    }

    public void clear() {
        local.remove();
    }
}
